home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / mail / pine3.96.tar.gz / pine3.96.tar / pine3.96 / pine / osdep / lstcmpnt < prev    next >
Text File  |  1996-02-15  |  417b  |  22 lines

  1. /*----------------------------------------------------------------------
  2.       Return pointer to last component of pathname.
  3.  
  4.   Args: filename     -- The pathname.
  5.  
  6.  Result: Returned pointer points to last component in the input argument.
  7.   ----*/
  8. char *
  9. last_cmpnt(filename)
  10.     char *filename;
  11. {
  12.     register char *p = NULL, *q = filename;
  13.  
  14.     while(q = strchr(q, '/'))
  15.       if(*++q)
  16.     p = q;
  17.  
  18.     return(p);
  19. }
  20.  
  21.  
  22.